package com.ztgf.shopping.service.shop;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.ztgf.shopping.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ztgf.shopping.mapper.shop.ShopEarnestMoneyLogMapper;
import com.ztgf.shopping.models.service.shop.IShopEarnestMoneyLogService;
import com.ztgf.shopping.models.bo.shop.ShopEarnestMoneyLogSaveBO;
import com.ztgf.shopping.models.dto.shop.ShopEarnestMoneyLogDTO;

/**
 * 店铺保证金日志表控制器
 *
 * @author zhanghualang
 * @Date 2020-05-27 14:43:37
 */
@DubboService
public class ShopEarnestMoneyLogServiceImpl extends ServiceImpl<ShopEarnestMoneyLogMapper, ShopEarnestMoneyLogDTO> implements IShopEarnestMoneyLogService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(ShopEarnestMoneyLogSaveBO saveBO) {
        ShopEarnestMoneyLogDTO dto = new ShopEarnestMoneyLogDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
